package com.flame.workflow.ru.mapper;

import java.util.List;

import com.flame.workflow.ru.controller.vo.TaskVo;
import com.flame.workflow.ru.entity.Task;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * flame_workflow_ru_task 流程实例任务表
 *
 * @author 吴欣童
 * @since 2023-06-05 14:28:28
 */
@Mapper
public interface TaskMapper {

    List<Task> page(TaskVo taskVo);

    void insert(Task task);

    void updateById(Task task);

    void deleteById(@Param("taskId") Long taskId);

    Task findById(@Param("taskId") Long taskId);

    List<Task> listByInstanceId(@Param("instanceId") Long instanceId);

    List<Task> listByBranchTaskId(@Param("branchTaskId") Long branchTaskId);

    Task findByNodeId(@Param("instanceId") Long instanceId, @Param("nodeId") Integer nodeId);

    List<Task> listByParentTaskId(@Param("parentTaskId") Long parentTaskId);
}